package by.siarhei.java.tij.polymorphism.exercises.ex10;

/**
 * @author Siarhei Shchahratsou <s.siarhei@gmail.com>
 * @since 23.03.2014
 */
public class Exercise10 {
    public static void main(String[] args) {
        Base base = new Derived();
        base.doFirst();
    }
}

class Base {
    void doFirst() {
        System.out.println("Base.doFirst()");
        doSecond();
    }

    void doSecond() {
        System.out.println("Base.doSecond()");
    }
}

class Derived extends Base {
    void doSecond() {
        System.out.println("Derived.doSecond()");
    }
}
